package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by oyhk on 2017/3/9.
 *
 * 用户表 扩展系统权限
 *
 * 如果是mallId 有值，那么就是对应用户M端权限
 */
@Entity
@Table(name = "auth_user_resource")
@DynamicInsert
@DynamicUpdate
public class AuthUserResource extends IDEntityMall {

    @Column(columnDefinition = "bigint comment '用户id'")
    private Long userId;
    @Column(columnDefinition = "bigint comment '平台id'")
    private Long mallId;
    @Column(columnDefinition = "bigint comment '平台id'")
    private Long userAdminId;
    @Column(columnDefinition = "bigint comment '商家id'")
    private Long merchantId;
    @Column(columnDefinition = "bigint comment '菜单资源id'")
    private Long resourceId;
    @Column(columnDefinition = "bigint comment '菜单资源父id'")
    private Long resourceParentId;

    public Long getResourceParentId() {
        return resourceParentId;
    }

    public void setResourceParentId(Long resourceParentId) {
        this.resourceParentId = resourceParentId;
    }

    public Long getResourceId() {
        return resourceId;
    }

    public void setResourceId(Long resourceId) {
        this.resourceId = resourceId;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public Long getUserAdminId() {
        return userAdminId;
    }

    public void setUserAdminId(Long userAdminId) {
        this.userAdminId = userAdminId;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

}
